package com.glo.quiki.controller;

import com.glo.quiki.model.QuikiPaymentOrder;
import com.glo.quiki.service.QuikiService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/withdraw")
@RequiredArgsConstructor
public class WithdrawOrderController {

    private final QuikiService quikiService;

    @PostMapping("/order")
    public ResponseEntity withdrawOrder(@RequestParam String email, @RequestParam String password,
                                                @RequestParam String cuvAccount, @RequestParam String orderAmount,
                                                @RequestParam(required = false) String rememberCookie) throws Exception {
        return ResponseEntity.ok(quikiService.withdrawOrder(email,password,cuvAccount,orderAmount,rememberCookie));
    }

}